Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context Menu For Plugins #752

Merged
merged 9 commits into from
Jan 20, 2021
Merged

Context Menu For Plugins #752

merged 9 commits into from
Jan 20, 2021

Conversation

ioedeveloper
Copy link
Member

No description provided.

@@ -34,7 +34,7 @@ var canUpload = window.File || window.FileReader || window.FileList || window.Bl
const profile = {
name: 'fileExplorers',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this new API will be public, so we should take the new very carefully. cc @bunsenstraat

*/
registerContextMenuItem (item, callback) {
if (!item.name || !callback) return console.error('menu name and callback is mandatory')
if (!item.type && !item.path && !item.extension && !item.pattern) return console.error('invalid file matching criteria provided')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could also throw an error here, so it bounces back to the caller

* @param item { name: string, type?: string[], path?: string[], extension?: string[], pattern?: string[] }
* @param callback (...args) => void
*/
registerContextMenuItem (item, callback) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing a callback might not work in the context of an iframe... (e.g I don't think that function is a valid parameter for a remix api
cc @bunsenstraat

@yann300 yann300 mentioned this pull request Jan 20, 2021
3 tasks
@ioedeveloper ioedeveloper merged commit fca2055 into master Jan 20, 2021
@ioedeveloper ioedeveloper deleted the context-menu branch January 20, 2021 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants